﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ccit.ClassLibrary;

namespace Ccit.SysPlat.Organ
{
    /// <summary>
    /// Description: 系统平台组织机构 -> 系统职位接口
    /// Author: tim 2010-02-22
    /// </summary>
    public interface IPos
    {        
        /// <summary>
        /// 根据职位Id串获取职位名称串
        /// </summary>
        /// <param name="posIds">逗号分隔的职位Id串</param>
        /// <param name="separator">返回的职位名称间的分隔符</param>        
        /// <returns></returns>
        string GetPosNamesByIds(string posIds, string separator);

        /// <summary>
        /// 根据职位Id串获取职位名称传
        /// </summary>
        /// <param name="posIds">逗号分隔的职位Id串</param>
        /// <param name="separator">返回的职位名称间的分隔符</param>
        /// <param name="isFilter">是否过滤掉无效的职位</param>
        /// <returns></returns>
        string GetPosNamesByIds(string posIds, string separator, eTrueFalse isFilter);

        /// <summary>
        /// 根据职位Id串返回部门记录名-值对儿字典集合
        /// </summary>
        /// <param name="posIds">职位Id串</param>
        /// <param name="findPosName">模糊查询职位名称</param>
        /// <returns></returns>
        List<MsKeyValue> GetPosListByIds(string posIds,string findPosName);

        /// <summary>
        /// 获取机构下的职位记录名-值对儿字典集合
        /// </summary>
        /// <param name="organId">机构Id</param>
        /// <param name="filterPosIds">过滤掉的职位记录Id串</param>   
        /// <param name="findPosName">模糊查询职位名称</param>
        /// <returns></returns>
        List<MsKeyValue> GetPosListByOrgan(string organId, string filterPosIds,string findPosName);

        /// <summary>
        /// 获取职位消息对象
        /// </summary>
        /// <param name="posId">职位Id</param>
        /// <returns></returns>
        MsPos GetPosInfo(string posId);


        /// <summary>
        /// 保存职位信息
        /// </summary>
        /// <param name="msPos">职位信息消息对象</param>
        /// <returns>
        ///     【0】: 操作结果
        ///     【1】: 操作提示
        /// </returns>
        List<string> Save(MsPos msPos);

        /// <summary>
        /// 删除职位记录
        /// </summary>
        /// <param name="posId">职位Id</param>
        /// <returns>
        ///     【0】: 操作结果
        ///     【1】: 操作提示
        /// </returns>
        List<string> Delete(string posId);


        /// <summary>
        /// 职位名称同名校验
        /// </summary>
        /// <param name="posId">职位Id</param>
        /// <param name="posName">职位名称</param>
        /// <param name="organId">机构Id</param>
        /// <returns></returns>
        List<string> IsExistPosName(string posId, string posName, string organId);
    }
}
